Optimal. Leaf size=63 \[ \frac {2 b x}{3 c}-\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {6037, 327, 218,
212, 209} \begin {gather*} \frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {2 b x}{3 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 218
Rule 327
Rule 6037
Rubi steps
\begin {align*} \int x^2 \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \, dx &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {1}{3} (2 b c) \int \frac {x^4}{1-c^2 x^4} \, dx\\ &=\frac {2 b x}{3 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {(2 b) \int \frac {1}{1-c^2 x^4} \, dx}{3 c}\\ &=\frac {2 b x}{3 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {b \int \frac {1}{1-c x^2} \, dx}{3 c}-\frac {b \int \frac {1}{1+c x^2} \, dx}{3 c}\\ &=\frac {2 b x}{3 c}-\frac {b \tan ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 91, normalized size = 1.44 \begin {gather*} \frac {2 b x}{3 c}+\frac {a x^3}{3}-\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {1}{3} b x^3 \tanh ^{-1}\left (c x^2\right )+\frac {b \log \left (1-\sqrt {c} x\right )}{6 c^{3/2}}-\frac {b \log \left (1+\sqrt {c} x\right )}{6 c^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 51, normalized size = 0.81
method | result | size |
default | \(\frac {x^{3} a}{3}+\frac {x^{3} b \arctanh \left (c \,x^{2}\right )}{3}+\frac {2 b x}{3 c}-\frac {b \arctanh \left (x \sqrt {c}\right )}{3 c^{\frac {3}{2}}}-\frac {b \arctan \left (x \sqrt {c}\right )}{3 c^{\frac {3}{2}}}\) | \(51\) |
risch | \(\frac {x^{3} b \ln \left (c \,x^{2}+1\right )}{6}-\frac {b \,x^{3} \ln \left (-c \,x^{2}+1\right )}{6}+\frac {x^{3} a}{3}-\frac {b \ln \left (1+x \sqrt {c}\right )}{6 c^{\frac {3}{2}}}+\frac {b \ln \left (x \sqrt {c}-1\right )}{6 c^{\frac {3}{2}}}+\frac {2 b x}{3 c}+\frac {\sqrt {-c}\, \ln \left (1+x \sqrt {-c}\right ) b}{6 c^{2}}-\frac {\sqrt {-c}\, \ln \left (x \sqrt {-c}-1\right ) b}{6 c^{2}}\) | \(114\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 66, normalized size = 1.05 \begin {gather*} \frac {1}{3} \, a x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x^{2}\right ) + c {\left (\frac {4 \, x}{c^{2}} - \frac {2 \, \arctan \left (\sqrt {c} x\right )}{c^{\frac {5}{2}}} + \frac {\log \left (\frac {c x - \sqrt {c}}{c x + \sqrt {c}}\right )}{c^{\frac {5}{2}}}\right )}\right )} b \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] Leaf count of result is larger than twice the leaf count of optimal. 97 vs.
\(2 (47) = 94\).
time = 0.36, size = 186, normalized size = 2.95 \begin {gather*} \left [\frac {b c^{2} x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c^{2} x^{3} + 4 \, b c x - 2 \, b \sqrt {c} \arctan \left (\sqrt {c} x\right ) + b \sqrt {c} \log \left (\frac {c x^{2} - 2 \, \sqrt {c} x + 1}{c x^{2} - 1}\right )}{6 \, c^{2}}, \frac {b c^{2} x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c^{2} x^{3} + 4 \, b c x + 2 \, b \sqrt {-c} \arctan \left (\sqrt {-c} x\right ) - b \sqrt {-c} \log \left (\frac {c x^{2} + 2 \, \sqrt {-c} x - 1}{c x^{2} + 1}\right )}{6 \, c^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 670 vs.
\(2 (56) = 112\).
time = 3.38, size = 670, normalized size = 10.63 \begin {gather*} \begin {cases} \frac {4 a c^{2} x^{3} \sqrt {- \frac {1}{c}}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 a c^{2} x^{3} \sqrt {\frac {1}{c}}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c^{2} x^{3} \sqrt {- \frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c^{2} x^{3} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} - \frac {b c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {b c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {8 b c x \sqrt {- \frac {1}{c}}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {8 b c x \sqrt {\frac {1}{c}}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} - \frac {6 b c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} - \frac {4 b \log {\left (x - \sqrt {- \frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} & \text {for}\: c \neq 0 \\\frac {a x^{3}}{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 75, normalized size = 1.19 \begin {gather*} -\frac {1}{3} \, b c^{5} {\left (\frac {\arctan \left (\sqrt {c} x\right )}{c^{\frac {13}{2}}} - \frac {\arctan \left (\frac {c x}{\sqrt {-c}}\right )}{\sqrt {-c} c^{6}}\right )} + \frac {1}{6} \, b x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + \frac {1}{3} \, a x^{3} + \frac {2 \, b x}{3 \, c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.85, size = 70, normalized size = 1.11 \begin {gather*} \frac {a\,x^3}{3}-\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\right )}{3\,c^{3/2}}+\frac {2\,b\,x}{3\,c}+\frac {b\,x^3\,\ln \left (c\,x^2+1\right )}{6}-\frac {b\,x^3\,\ln \left (1-c\,x^2\right )}{6}+\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3\,c^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________